cmake_minimum_required(VERSION 3.10)
project(my_terminal)

set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED ON)

set_property(GLOBAL PROPERTY INCLUDE_FILE)
set_property(GLOBAL PROPERTY SOURCE_FILE)
set_property(GLOBAL PROPERTY LINK_LIB)


add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src/)
get_property(SOURCE_FILE GLOBAL PROPERTY SOURCE_FILE)
get_property(INCLUDE_FILE GLOBAL PROPERTY INCLUDE_FILE)
get_property(LINK_LIB GLOBAL PROPERTY LINK_LIB)

add_executable(my_terminal
    src/main.c
    ${SOURCE_FILE}
)

target_include_directories(my_terminal PRIVATE ${INCLUDE_FILE})

target_link_libraries(my_terminal ${LINK_LIB})
